<? session_start();
//require("checksession.php");

	if ($_REQUEST["cmd"]=="Upload"){
		move_uploaded_file($_FILES["pimage"]["tmp_name"],"../anhhocsinh/".$_FILES["pimage"]["name"]);
		if ($_FILES["pimage"]["error"]==0){
	echo "<center><br><br>Upload successful file: ".$_FILES["pimage"]["name"]."<br><br>";
	echo "<input type=button value=\"Close this window\" onclick=\"window.close();\">";
	
	
		}	
		
	} else {

?>
<h1 align="center">Image Product </h1>
<FORM  enctype="multipart/form-data" method="POST">
<center>
<input type="file" name="pimage"><p>
	<input type="submit" value="Upload" name="cmd"></p>
</FORM></CENTER>
<? } ?>
